//HT1622驱动的段码屏

#include "../Y36_LCD_horizontal/chip.h"
#include "HT162X_Pin.h"


void HT162X_PinConfig(void)
{
    GPIO_Init(GPIOA0,IO_Lcd_Backlight,Output);
    GPIO_Init(GPIOA0,IO_Lcd_CS,Output);
    GPIO_Init(GPIOA0,IO_Lcd_WR,Output);
    GPIO_Init(GPIOA0,IO_Lcd_RD,Output);
    GPIO_Init(GPIOA0,IO_Lcd_Data,Output);

    Lcd_Backlight_ON;
    Lcd_CS_H;
    Lcd_RD_H;
    Lcd_WR_H;
    IO_Lcd_Data_H;
}

void HT162X_CS_Handled(uint8_t val)
{
    if(val == 0) Lcd_CS_L;
    else Lcd_CS_H;
}
void HT162X_RD_Handled(uint8_t val)
{
    if(val == 0) Lcd_RD_L;
    else Lcd_RD_H;
}
void HT162X_WR_Handled(uint8_t val)
{
    if(val == 0) Lcd_WR_L;
    else Lcd_WR_H;
}
void HT162X_Data_Handled(uint8_t val)
{
    if(val == 0) IO_Lcd_Data_L;
    else IO_Lcd_Data_H;
}
